<template>
  <div class="concent">
    <a-layout>
      <a-layout-header :style="{position: 'fixed', zIndex: 1, width: '100%' }"><IndexHeader></IndexHeader></a-layout-header>
      <a-layout-content>
        <transition name="page-transition">
          <route-view :key="key"/>
        </transition>
      </a-layout-content>
      <a-layout-footer><IndexFooter></IndexFooter></a-layout-footer>
    </a-layout>
  </div>
</template>

<script>
  import RouteView from './RouteView'
  import IndexHeader from '@/components/IndexHeader'
  import IndexFooter from '@/components/IndexFooter'
  export default {
    name: 'IndexLayout',
    computed: {
      key(){
        return this.$route.path + Math.random()+1;
      }
    },
    components:{
      RouteView,
      IndexHeader,
      IndexFooter
    }
  }
</script>

<style lang="less">
  .concent /deep/ .ant-layout{
    background-color: #ffffff;
  }
  .concent /deep/ .ant-layout-header{
    background-color: transparent;
    padding: 0;
  }
  .concent /deep/ .ant-layout-footer{
    background-color: #358eff;
    padding: 0;
  }
  .index-header{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
  }
  .page-transition-enter {
    opacity: 0;
  }

  .page-transition-leave-active {
    opacity: 0;
  }

  .page-transition-enter .page-transition-container,
  .page-transition-leave-active .page-transition-container {
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
</style>